<template>
  <div class="set-admin-study-line">
    <w-nav-bar
      title="回收站"/>
    <WCell
      v-for="(v, k) in models"
      :title="v.title"
      @click="cellClick(v)"
      :content="v.content"
      :footer="v.dateStr"
      :key="k"/>
    <w-dustbin
      ref="WDustbin"
      @reload="getModels"/>
  </div>
</template>

<script>
  import StudyTimeLineModel from '@/models/web/StudyTimeLineModel'
  import WCell from '@/components/mobile/cell/00'
  import WDustbin from '../../../../com/dustbin/index'
  export default {
    name: "SetAdminStudyLineDustbin",
    components: {
      WCell,
      WDustbin
    },
    data() {
      return {
        /**
         * 模型数组
         */
        models: []
      }
    },
    methods: {
      /**
       * 获取所有模型数据
       */
      getModels() {
        StudyTimeLineModel.dustbin_all().then((dataArr) => {
          this.models = dataArr
        }).catch(() => {})
      },
      cellClick(item) {
        this.$refs['WDustbin'].show(item)
      }
    },
    mounted() {
      this.getModels()
    }
  }
</script>

<style lang="scss" scoped>
  .set-admin-study-line {
  }
</style>
